Carbon


SetMenuItemKeyGlyph

Header: Menus.h Carbon status: Supported

Substitutes a keyboard glyph for the glyph normally displayed for a menu item’s keyboard equivalent.

OSErr SetMenuItemKeyGlyph (
    MenuHandle inMenu, 
    SInt16 inItem, 
    SInt16 inGlyph
);
inMenu

A handle to the menu that contains the menu item for which you wish to substitute a keyboard glyph.

inItem

An integer representing the item number of the menu item.

inGlyph

An integer representing the substitute glyph to display. Pass 0 if you wish no substitution to occur. For a description of keyboard glyphs and a list of the keyboard font character codes, see ëxmnu’.

function result

A result code.

DISCUSSION

The SetMenuItemKeyGlyph function overrides the character that would normally be displayed in a menu item’s keyboard equivalent with a substitute keyboard glyph. This is useful if the keyboard glyph in the font doesn’t match the actual character generated. For example, you might use this function to display function keys.

See also the function GetMenuItemKeyGlyph.

VERSION NOTES

This function is available with Appearance Manager 1.0 and later.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when CarbonLib 1.0 or later is installed. Exported by CarbonLib 1.0 and later and by CarbonLib 1.0 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)